<template>
  <div>
    <el-button type="primary">添加</el-button>
    <el-button type="success" :disabled="checkPermission('point-user-edit')">编辑</el-button>
    <el-button type="danger" :disabled="checkPermission('point-user-delete')">删除</el-button>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  name: 'Attendances',
  filters: {},
  components: {},
  props: {},
  data() {
    return {}
  },
  computed: {
    ...mapGetters(['userInfo'])
  },
  watch: {},
  created() {},
  mounted() {},
  methods: {
    checkPermission(str) {
      if (this.userInfo.roles.points) {
        return this.userInfo.roles.points.some(item => {
        // console.log(item)
          item === str
        })
      }
      return false
    }
  }
}
</script>

<style scoped lang='less'>

</style>
